package com.example.wowangz.modules.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.wowangz.modules.user.mapper.UserMapper;
import com.example.wowangz.modules.user.model.User;

/**
 * User的服务层
 * 
 * @author wowangz
 *
 */
@Service("userSerivce")
public class UserService {

	@Autowired
	private UserMapper userMapper;

	public List<User> selectUsers() {
		return userMapper.selectAll();
	}

	public User getUserById(String userId) {
		return userMapper.selectByPrimaryKey(userId);
	}

	public List<User> getUserByCondition(User user) {
		return userMapper.listUser(user);
	}

}
